    <div class="site_map" align="left">Trang chủ <img src="/onlinemarket/img/navbit-arrow-right.png"/> thông số sản phẩm</div>
    <div class="heading">
        <div class="heading_left"></div>
        <div class="heading_right"></div>
        <div class="heading_center">
        	<h3>Thông số sản phẩm</h3>
        </div>

        <div class="table">
            <h1>&nbsp;</h1>
            <form method="post" id="Parameter" name="Parameter" action="/onlinemarket/parameters/save">
                 <table style="padding-left: 20px; padding-right: 125px;" class="noborder">
                <tr>
                    <td>
                        <table >
                            <input type="hidden" id="id" name="id" value="<?php echo($parameter['Parameter']['id']); ?>"/>
                            <tr>
                                <td><font color="red">*</font>Tên thông số</td>
                                <td><input type="text" name="name" id="name" value="<?php echo($parameter['Parameter']['name']); ?>"/></td>
                                <td style="width: 50px;">&nbsp;</td>
                                <td><font color="red">*</font>Mô tả thuộc tính</td>
                                <td><textarea name="description" rows="4" cols="22" id="description"/><?php echo($parameter['Parameter']['description']);?>
                            </textarea> </td>
                                <td style="width: 30px;">&nbsp;</td>
                            </tr>
                            <tr>
                                <td colspan="5" align="right">
                                    <input type="submit" value="Lưu" style="height: 25px; padding-top: 0.3em;"/>
                  					<input type="button" value="Hủy" style="height: 25px; padding-top: 0.3em;" onclick="onCancel();"/>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-bottom: 0;"><hr /></td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-top: 0;">Trường <font color="red">*</font> yêu cầu phải nhập</td>
                </tr>
                </table>
            </form>
        </div>
<table class="border" style="width: 100%;">
    <tr>
        <td colspan="7" align=center><a href="/onlinemarket/parameters">Thêm thuộc tính mới</a></td>
    </tr>
    <tr>
        <th>name</th>
        <th>description</th>
		<th>action</th>
    </tr>
<?php foreach ($parameterList as $param) : ?>
<tr>
    <td align=center><?php echo($param['Parameter']['name']); ?></td>
    <td align=center><?php echo($param['Parameter']['description']); ?></td>
	<td align=center>
        <img style="cursor: pointer;" src="/onlinemarket/img/system/bt_edit.png" onclick="onEdit('/onlinemarket/parameters/index/ <?php echo($param['Parameter']['id']);?>')" alt="Sửa" title="Sửa"/>
        <img style="cursor: pointer;" src="/onlinemarket/img/system/bt_delete.png" onclick="onEdit('/onlinemarket/parameters/delete/?id=<?php echo($param['Parameter']['id']);?>')" alt="Xóa" title="Xóa"/>
    </td>
</tr>
<?php endforeach; ?>
</table>
<div style="text-align: right;">
    <?php echo $this->Paginator->numbers();?>
    <?php echo $this->Paginator->prev('« Previous', null, null, array('class' => 'disabled')); ?>
    <?php echo $this->Paginator->next('Next »', null, null, array('class' => 'disabled')); ?>
</div>
</div>
<script>
function onEdit(link) {
        window.location = link;
    }
    function onCancel() {
        $('form').slideUp('slow');
    }
    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split('&');
        for (var i=0; i<vars.length; i++) {
            var pair = vars[i].split('=');
            if (pair[0] == variable) {
                return pair[1];
            }
        }
    };

</script>
